import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import { IsNotEmpty, IsNumber } from "class-validator";

/*
 * @Author: your name
 * @Date: 2022-03-20 16:27:56
 * @LastEditTime: 2022-03-20 20:17:49
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \drivingTow\src\article\dto\select-article.dto.ts
 */
export class SelectArticleDto {
  
  @ApiProperty({ description: '文章标题' })
  readonly title: string;

  @ApiPropertyOptional({ description: '内容' })
  readonly content: string;

  @IsNotEmpty()
  @ApiProperty({ description: '文章分类' })
  readonly category: number;

  @IsNotEmpty()
  @ApiProperty({ description: '显示的条数' })
  readonly pageSize: number;

  @IsNotEmpty()
  @ApiProperty({ description: '页数' })
  readonly pageNum: number;

}
export class SelectDto{
  @IsNotEmpty()
  @ApiProperty({ description: 'ID' })
  readonly id:number

  @IsNotEmpty()
  @ApiProperty({ description: '显示的条数' })
  readonly pageSize: number;

  @IsNotEmpty()
  @ApiProperty({ description: '页数' })
  readonly pageNum: number;
}
